﻿using System;
using System.Data;
using System.Collections.Generic;
using DataLib.Common;
using DataLib.Model;

namespace DataLib.BLL
{
	/// <summary>
	/// OutStorage
	/// </summary>
    public partial class Product
	{
        private readonly DataLib.DAL.Product dal = new DataLib.DAL.Product();
        private readonly DataLib.DAL.OutStorage dal1 = new DataLib.DAL.OutStorage();

		#region  ExtensionMethod

           /// <summary>
        /// 取出库生产单号
        /// </summary>
        /// <returns>需要返回的序列号</returns>
        public string GetOutNo()
        {
            return dal.GetOutNo();
        }

          /// <summary>
        /// 根据barcodeID取得整个value数组
        /// </summary>
        /// <param name="arrbarid"></param>
        /// <returns></returns>
        public string GetBarcodeValueArr(string arrbarid)
        {
            return dal.GetBarcodeValueArr(arrbarid);
        }


                    /// <summary>
        /// 验证将要出库的BarCode是否合法
        /// </summary>
        /// <param name="barcodevalue"></param>
        /// <param name="outType"></param>
        /// <param name="returnvalue"></param>
        /// <returns></returns>
        public Model.BarCode OutBarCodeConfirm(string barcodevalue, string vload, ref string returnvalue)
        {
            return dal.OutBarCodeConfirm(barcodevalue, vload, ref returnvalue);
        }



        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(DataLib.Model.OutStorage model)
        {
            return dal1.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(DataLib.Model.OutStorage model)
        {
            return dal1.Update(model);
        }

        
        /// <summary>
        /// 出库提交事件
        /// </summary>
        /// <param name="model">OutStorage的实例对象</param>
        /// <param name="strarr">需要出库的BarCode列表</param>
        /// <returns></returns>
        public int OutStorageSubmit(Model.OutStorage model, string strarr)
        {
            return dal.OutStorageSubmit(model, strarr);
        }
		#endregion  ExtensionMethod


    }
}

